home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Libraries / MovableModal Library / MovableModal.h next >
Encoding:
Text File  |  1993-10-12  |  1.8 KB  |  50 lines  |  [TEXT/KAHL]

  1. /*
  2.  *  MovableModal.h
  3.  *
  4.  *  C interface to the MovableModal.Lib library
  5.  *
  6.  *  The MovableModal.Lib library includes some simple routines to handle
  7.  *  movable modal dialogs in much the same way as non-movable modal dialogs are
  8.  *  handled, but following Apple HIGs on the subject
  9.  *
  10.  *  Written by Marco Piovanelli (piovanel@dsi.unimi.it)
  11.  *  ANTIĀ© 1993 Merzwaren
  12.  */
  13.  
  14.  
  15. /*
  16.  *  Call DisableMenuBar soon after putting up your movable modal dialog (the
  17.  *  frontmost window is assumed to be your dialog).
  18.  *  Pass the menu ID of your Edit menu in editMenuID, or 0 if you don't have one.
  19.  *  DisableMenuBar disables all menus except the system menus
  20.  *  (Help, Keyboard and Application).
  21.  *  It enables Cut, Copy and Paste in the Edit menu if your dialog contains edit
  22.  *  fields.
  23.  *  Pass the ID of a valid 'hmnu' resource in hmnuID if you want menu
  24.  *  help string remapping to take place, as described in "Toolbox
  25.  *  M.TB.MovableModalDialog"; otherwise pass -1 (if the Help Manager isn't
  26.  *  available, nothing will happen anyway)
  27.  */
  28.  
  29. pascal void DisableMenuBar(short editMenuID, short hmnuID);
  30.  
  31. /*
  32.  *  Call ReEnableMenuBar soon after bringing down your movable modal dialog box.
  33.  *  ReEnableMenuBar will restore the previous enableFlags for all menus in
  34.  *  the menu bar
  35.  */
  36.  
  37. pascal void ReEnableMenuBar(void);
  38.  
  39. /* 
  40.  *  MovableModalDialog is the routine that does most of the work.
  41.  *  It's very much like the Toolbox routine ModalDialog in system 7.x.
  42.  *  MovableModalDialog allows access to the menu bar (even under system 6.0.x)
  43.  *  and major context switches.
  44.  *  You normally will want to know when a context switch takes place while your
  45.  *  dialog is in front: to do this, you have to check for events of type osEvt
  46.  *  from within your filter procedure
  47.  */
  48.  
  49. pascal void MovableModalDialog(ModalFilterProcPtr filterProc, short *itemHit);
  50.